Skip to content

Conversation

tbrand
Copy link
Contributor

@tbrand tbrand commented Oct 1, 2025

Description of Changes

  • props.vpc.selectSubnets()で、SubnetFilter.byIds(props.subnetIds)を使ってサブネットをフィルタしている
  • しかし、props.vpcはec2.Vpc.fromLookup()で取得された既存VPCの参照
  • CDKのfromLookup()では、指定されたサブネットIDの詳細情報(AZ情報など)が正しく解決されない場合がある
  • 結果としてsubnets配列が空になり、58行目のif (ipAddresses.length < 2)でエラーが発生

Checklist

  • Modified relevant documentation
  • Verified operation in local environment
  • Executed npm run cdk:test and if there are snapshot differences, execute npm run cdk:test:update-snapshot to update snapshots

Related Issues

#1295

Copy link
Contributor

@wadabee wadabee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wadabee wadabee merged commit 53bda27 into main Oct 7, 2025
6 checks passed
@wadabee wadabee deleted the closed-fix-subnets branch October 7, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants